package com.itheima.io;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

public class Demo2 {
    public static void main(String[] args) throws IOException {
       // FileOutputStream fos=new FileOutputStream(new File("day11_file&&io\\a.txt"));
       //FileOutputStream fos=new FileOutputStream("day11_file&&io\\a.txt");
        //true表示不会清除原来文件中的内容
        FileOutputStream fos=new FileOutputStream("day11_file&&io\\a.txt",true);
        byte[] bytes={97,98,99};
        fos.write(bytes);
        String s="张三,23,男";
        byte[] bytes1 = s.getBytes();
        fos.write(bytes1);
        fos.close();




    }
}
